 <div class="widget">
    <div class="widget-header">
        <h3>
            <i class="icon-th-list"></i>
            Ticket Trail Oldest First
        </h3>
    </div> <!-- /widget-header -->

    <div class="widget-content" style="padding-top: 0px;">
        <?php
        //$u = $this->Html->url('/');
        //debug(WWW_ROOT);
            foreach($ticket_trail as $key => $arr){
                if(isset($arr['attachments'])){
                ?>
                    <fieldset>
                        <legend><?php echo 'Attachments';?></legend>
                        <table class="table table-bordered table-striped">
                            <thead>
                                <tr>
                                    <th>File Name</th>
                                    <th>Uploaded By</th>
                                    <th>Date Uploaded</th>
                                </tr>
                            </thead>
                            <tbody>
                            <?php
                            foreach($arr['attachments'] as $file){
                                $url = WWW_ROOT.'files/'.$file['url'];
                                $file_name = $file['file_name'];
                            ?>
                                <tr>
                                    <th><a href="<?php echo $url;?>"><?php echo $file_name;?></a></th>
                                    <th><?php echo $file['uploaded_by'];?></th>
                                    <th><?php echo $file['created'];?></th>
                                </tr>
                            <?php
                            }
                            ?>
                            </tbody>
                        </table>
                    </fieldset>
                 <?php
                }
                ?>
            <fieldset>
                <legend><?php echo 'Date Modified:  '.$arr['modified'];?></legend>
                <div id="page-title" class="clearfix">
                    <h1 style="font-size: 16px;"><?php echo 'Modified By:  '.$arr['modified_by'];?></h1>
                    <ul class="breadcrumb">
                        <li style="display: block">
                            <table class="table table-bordered table-striped">
                                <?php
                                foreach($arr['data'] as $name => $value){
                                ?>
                                    <tr>
                                        <td class="span3"><strong><?php echo $name; ?></strong></td>
                                        <td><?php echo $value;?></td>
                                    </tr>
                                <?php
                                }
                                ?>
                            </table>
                        </li>
                    </ul>
                </div>
            </fieldset>
        <?php
            }
        ?>
    </div> <!-- /widget-content -->
</div> <!-- /widget -->
